﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace AllNations
{
    public partial class SundaySchoolResource : MakeItWeb.Framework.MakeItWebAuthenticatedUserPage
    {
        public override string SelectedSection
        {
            get
            {
                return "Education";
            }
        }
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            if (!IsInRole("SundaySchoolTeacher"))
                throw new System.Security.SecurityException();
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsInRole("SundaySchoolResourcesAdmin") || IsInRole("Administrator"))
            {
                fileExplorerSundaySchoolResources.Configuration.DeletePaths = new string[] { "~/Resources/SundaySchoolResources/Root" };
                fileExplorerSundaySchoolResources.Configuration.UploadPaths = new string[] { "~/Resources/SundaySchoolResources/Root" };
                fileExplorerSundaySchoolResources.Configuration.EnableAsyncUpload = true;
                fileExplorerSundaySchoolResources.Configuration.MaxUploadFileSize = 104857600;
            }
        }
    }
}